package com.ruibang.glass.quality.controller;

import com.ruibang.glass.quality.domain.req.DefectSizeDataReq;
import com.ruibang.glass.quality.domain.req.DiscardDefectDataReq;
import com.ruibang.glass.quality.domain.req.LayeredPointDataReq;
import com.ruibang.glass.quality.service.HotEndDiscardDefectDataService;
import com.teaming.cloud.framework2.common.model.ResultBody;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * @Author: songJinKang
 * @CreateTime: 2023-09-06  11:32
 * @Description: TODO
 * @Version: 1.0
 */

@RestController
@RequestMapping("/api/defect/discard/hotEnd")
@Api(value = "缺陷判废数据控制器(热端)", tags = {"缺陷判废数据控制器（热端）"})
public class HotEndDiscardDefectDataController {

    @Autowired
    private HotEndDiscardDefectDataService hotEndDiscardDefectDataService;

    @PostMapping("/queryColdDirect")
    @ApiOperation(value = "溶解缺陷map图", notes = "溶解缺陷map图")
    public ResultBody queryDefectMapData(@RequestBody @Valid DiscardDefectDataReq discardDefectDataReq) {
        return hotEndDiscardDefectDataService.queryDefectMapData(discardDefectDataReq);
    }

    @PostMapping("/querySizePointData")
    @ApiOperation(value = "判废的气泡、结石、铂金的尺寸图", notes = "判废的气泡、结石、铂金的尺寸图")
    public ResultBody queryDefectSizeData(@RequestBody @Valid DefectSizeDataReq defectSizeDataReq) {
        return hotEndDiscardDefectDataService.queryDefectSizeData(defectSizeDataReq);
    }

    @PostMapping("/queryLayeredPointData")
    @ApiOperation(value = "判废的气泡、结石、铂金的层面分布图", notes = "判废的气泡、结石、铂金的层面分布图")
    public ResultBody queryLayeredPointData(@RequestBody @Valid LayeredPointDataReq layeredPointDataReq) {
        return hotEndDiscardDefectDataService.queryLayeredPointData(layeredPointDataReq);
    }

}
